package io.renren.modules.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.erp.entity.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface DepotService extends IService<Depot> {

    Depot getDepot(long id)throws Exception;
    List<Depot> getDepotListByIds(String ids)throws Exception;
    List<Depot> getDepot()throws Exception ;
    List<Depot> getAllList()throws Exception ;

    List<Sysuser> getAllUser()throws Exception ;
    List<DepotHead> getAllSubtype()throws Exception ;

    PageUtils select(String name, Integer type, String remark, int currPage, int pageSize)throws Exception ;

    Long countDepot(String name, Integer type, String remark)throws Exception ;

    int insertDepot(String beanJson, HttpServletRequest request)throws Exception ;
    int updateDepot(String beanJson, Long id, HttpServletRequest request) throws Exception;

    int deleteDepot(Long id, HttpServletRequest request)throws Exception ;

    int batchDeleteDepot(String ids, HttpServletRequest request) throws Exception;

    int checkIsNameExist(Long id, String name)throws Exception ;
    List<Depot> findUserDepot()throws Exception;
    List<Depot> findGiftByType(Integer type)throws Exception;
    int batchDeleteDepotByIds(String ids,Long userId)throws Exception ;
    int batchDeleteDepotByIdsNormal(String ids,Long userId) throws Exception ;
    int updateDepotIsDefault(Boolean isDefault, Long depotID) throws Exception;
    Long getIdByName(String name);
}
